// 获取医院产品列表
export  function  getHospitalProductList(id) {
  const db = wx.cloud.database()
  // console.log("product")
  return new Promise((resolve, reject) => {
    db.collection('product')
        .where({
          hospital_id: id
        })
        .get({
        success: (res) => {
          console.log(res,"========")
          resolve(res.data)
        },
    })
  })
}


// 获取医院详情
export  function  getHospitalInfoById(id) {
  const db = wx.cloud.database()
  // console.log("product")
  return new Promise((resolve, reject) => {
    db.collection('hospital_id')
        .where({
          hospital_id: id
        })
        .get({
          success: (res) => {
            console.log(res,"========")
            resolve(res.data)
          },
        })
  })
}